package sysu.el.tuple;

public class Tuple {
	public static class TDbl<A, B>{
		public A a; public B b;
		public TDbl(A a, B b){
			this.a = a;
			this.b = b;
		}
	}
	
	public static class TTri<A, B, C> extends TDbl<A, B>{
		public C c;
		public TTri(A a, B b, C c){
			super(a, b);
			this.c = c;
		}
	}
	
	public static class TQua<A, B, C, D> extends TTri<A, B, C>{
		public D d;
		public TQua(A a, B b, C c, D d){
			super(a, b, c);
			this.d = d;
		}
	}
	
	public static class IIII{
		public int a, b, c, d;
		public IIII(int a, int b, int c, int d){
			this.a = a;
			this.b = b;
			this.c = c;
			this.d = d;
		}
		
		public void reset(int init){
			this.a = init;
			this.b = init;
			this.c = init;
			this.d = init;
		}
		
		public void max2(int value, int rec){
			if (this.a < value){
				this.c = this.a;
				this.d = this.b;
				this.a = value;
				this.b = rec;						
			}else if (this.c < value){
				this.c = value;
				this.d = rec;
			}
		}
	}
}


